package com.tssup.fesco.common.enumeration;

/**
 * Created by franco.cheng on 2017/3/21.
 */
public enum Payer {
    PERSONAL("个人支付", 1), ENTERPRISE("企业支付", 2), OFFLINE("线下洽谈", 3);

    private String displayName;
    private Integer value;

    Payer(String displayName, Integer value) {
        this.displayName = displayName;
        this.value = value;
    }

    public static String getPayerDisplayName(Integer value) {
        for (Payer payer : Payer.values()) {
            if (payer.getValue().equals(value)) {
                return payer.getDisplayName();
            }
        }
        return null;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }
}
